﻿<!DOCTYPE html>
<!--总体评估考核评分-->
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

    <style>
        h3 {
            text-align: center;
        }

        h3 .elst-select-mini {
            width: 200px;
            display: inline-block;
        }

        h3 .elst-select-mini .el-input__inner {
            font-size: 17px
        }

        .remark {
            color: #606266;
            margin-left: 40px;
            font-size: 14px;
        }

        .el-form-item__content {
            margin-left: 0px !important;
        }

        .el-form-item {
            margin-bottom: 0px !important;
        }

        .td-p {
            float: left;
            margin: 4px;
        }
        .el-table__body-wrapper table tbody tr td {
            text-align: center;
        }
        .elst-select-mini .el-form-item__content {
            text-align: left;
        }
    </style>
</head>

<body>
    <div id="app" v-cloak class="popupW100">
        <el-form :model="Form" status-icon :rules="rules" ref="ruleForm" label-width="180px" size="mini"
            label-position="right">
            <el-row>
                <h3>
                    承包商总体评价结果
                </h3>
                <el-col :span="11">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <p class="main-label">{{OverallAssessment.Type+mark.m}}</p>
                            <p class="lh35">{{Form.sysDataDic.value}}</p>
                        </el-form-item>
                    </div>
                </el-col>
                <el-col :span="11" :offset="2">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <p class="main-label">{{OverallAssessment.ContractorName+mark.m}}</p>
                            <p class="lh35">{{Form.cbS_List.contractorName}}</p>
                        </el-form-item>
                    </div>
                </el-col>

                <!--<el-col :span="11">
        <div class="elst-select-mini">
            <el-form-item>
                <p class="main-label">{{OverallAssessment.ProjectName+mark.m}}</p>
                <p class="lh35">{{Form.ProjectName}}</p>
            </el-form-item>
        </div>
    </el-col>
    <el-col :span="11" :offset="2">
        <div class="elst-select-mini">
            <el-form-item>
                <p class="main-label">{{OverallAssessment.ContractNo+mark.m}}</p>
                <p class="lh35">{{Form.ContractNo}}</p>
            </el-form-item>
        </div>
    </el-col>-->
                <br>
                <br>
                <el-table :data="Form.cbS_TotalCheckDetail" stripe border="" show-summary style="width: 100%">
                    <el-table-column type="index" :label="col.SequenceNumber" :index="indexMethod" width="85"
                                     show-overflow-tooltip="true"></el-table-column>
                    <el-table-column prop="cbS_TotalCheckItem.checkProject" :label="OverallAssessment.ExamContent">
                    </el-table-column>
                    <el-table-column prop="cbS_TotalCheckItem.weightPoints" sortable :label="OverallAssessment.Weight">
                    </el-table-column>
                    <el-table-column prop="score" sortable :label="OverallAssessment.Score">
                    </el-table-column>
                    <el-table-column prop="reviewPeopleText" :label="OverallAssessment.Evaluator">
                    </el-table-column>
                </el-table>
                <div class="el-table el-table--fit el-table--striped el-table--border el-table--enable-row-hover el-table--enable-row-transition"
                     style="width: 100%;">
                    <div class="">
                        <table cellspacing="0" cellpadding="0" border="0" class="el-table__footer" style="width: 100%">
                            <tbody class="has-gutter">
                                <tr>
                                    <td colspan="1" rowspan="1" class="el-table_1_column_1 is-leaf" style="width: 85px">
                                        <div class="cell">{{OverallAssessment.summary+mark.m}}</div>
                                    </td>
                                    <td colspan="1" rowspan="1" class="el-table_1_column_2 is-leaf">
                                        <el-row class="cell">
                                            <p class="td-p">属地主管：</p>
                                            <div class="elst-select-mini">
                                                <el-form-item>
                                                    <signature class="fl" v-model="Form.territorialName" :disabled="false"></signature>
                                                    <!--<el-select v-model="Form.territorialEvaluationConclusion" disabled="true">
                            <el-option label="请选择" value=""></el-option>
                            <el-option label="合格" value="合格"> </el-option>
                            <el-option label="不合格" value="不合格"> </el-option>
                        </el-select>-->
                                                </el-form-item>
                                            </div>
                                            <br>
                                            <el-row>
                                                <el-col :span="12">
                                                    <!--<p class="td-p">{{col.btnSign}}：</p>
    <signature class="fl" v-model="value" :disabled="false"></signature>-->
                                                    <p class="td-p">结论：</p>
                                                    <div class="elst-select-mini">
                                                        <el-form-item>
                                                            <div style="position: absolute;z-index:999;left:0;right:0;margin-left:100px;">
                                                                <el-input v-if="Form.state === '1'" type="text" v-model="Form.territorialEvaluationConclusion" autocomplete="off" style="width:100% !important;border: 1px solid #DCDFE6;" size="mini">
                                                                </el-input>
                                                                <el-input v-else type="text" v-model="Form.territorialEvaluationConclusion" autocomplete="off" style="width:100% !important;border: 1px solid #DCDFE6;" size="mini" disabled>
                                                                </el-input>
                                                            </div>
                                                        </el-form-item>
                                                    </div>
                                                </el-col>
                                                <el-col :span="12">
                                                    <div class="elst-select-mini fr">
                                                        <el-form-item v-if="Form.state === '1'">
                                                            <el-date-picker v-model="Form.territorialEvaluationDate" type="date" value-format="yyyy-MM-dd" 
                                                                            placeholder="选择日期">
                                                            </el-date-picker>
                                                        </el-form-item>
                                                        <el-form-item v-else>
                                                            <el-date-picker v-model="Form.territorialEvaluationDate" type="date" value-format="yyyy-MM-dd" 
                                                                            placeholder="选择日期" disabled>
                                                            </el-date-picker>
                                                        </el-form-item>
                                                    </div>
                                                    <p class="td-p fr">{{OverallAssessment.Data+mark.m}}</p>
                                                </el-col>
                                            </el-row>
                                        </el-row>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="1" rowspan="1" class="el-table_1_column_1 is-leaf" style="width: 85px">
                                        <div class="cell">{{OverallAssessment.summary+mark.m}}</div>
                                    </td>
                                    <td colspan="1" rowspan="1" class="el-table_1_column_2 is-leaf">
                                        <el-row class="cell">
                                            <p class="td-p">业务管理部门：</p>
                                            <div class="elst-select-mini">
                                                <el-form-item>
                                                    <signature class="fl" v-model="value" :disabled="false"></signature>
                                                    <!--<el-select v-model="Form.businessManagementEvaluationConclusion" disabled="true">
                            <el-option label="请选择" value=""></el-option>
                            <el-option label="合格" value="合格"> </el-option>
                            <el-option label="不合格" value="不合格"> </el-option>
                        </el-select>-->
                                                </el-form-item>
                                            </div>
                                            <br>
                                            <el-row>
                                                <el-col :span="12">
                                                    <!--<p class="td-p">{{col.btnSign}}：</p>
    <signature class="fl" v-model="value" :disabled="false"></signature>-->
                                                    <p class="td-p">结论：</p>
                                                    <div class="elst-select-mini">
                                                        <el-form-item>
                                                            <div style="position: absolute;z-index:999;left:0;right:0;margin-left:100px;">
                                                                <el-input v-if="Form.state === '2'" type="text" v-model="Form.businessManagementEvaluationConclusion" autocomplete="off" style="width:100% !important;border: 1px solid #DCDFE6;" size="mini">
                                                                </el-input>
                                                                <el-input v-else type="text" v-model="Form.businessManagementEvaluationConclusion" autocomplete="off" style="width:100% !important;border: 1px solid #DCDFE6;" size="mini" disabled>
                                                                </el-input>
                                                            </div>
                                                        </el-form-item>
                                                    </div>
                                                </el-col>
                                                <el-col :span="12">
                                                    <div class="elst-select-mini fr">
                                                        <el-form-item v-if="Form.state === '2'">
                                                            <el-date-picker v-model="Form.businessManagementEvaluationData" type="date" value-format="yyyy-MM-dd" 
                                                                            placeholder="选择日期">
                                                            </el-date-picker>
                                                        </el-form-item>
                                                        <el-form-item v-else>
                                                            <el-date-picker v-model="Form.businessManagementEvaluationData" type="date" value-format="yyyy-MM-dd" 
                                                                            placeholder="选择日期" disabled>
                                                            </el-date-picker>
                                                        </el-form-item>
                                                    </div>
                                                    <p class="td-p fr">{{OverallAssessment.Data+mark.m}}</p>
                                                </el-col>
                                            </el-row>
                                        </el-row>
                                    </td>
                                </tr>
                                <tr v-for='(item,i) in Form.cbS_TotalCheckHeadApprove'>
                                    <td colspan="1" rowspan="1" class="el-table_1_column_1 is-leaf" style="width: 85px">
                                        <div class="cell">{{OverallAssessment.results+mark.m}}</div>
                                    </td>
                                    
                                    <td colspan="1" rowspan="1" class="el-table_1_column_2 is-leaf">
                                        <el-row v-if="i===Form.cbS_TotalCheckHeadApprove.length-1  && Form.mark02===item.mark01" class="cell">
                                            <p class="td-p">是否列入合格承包商名录：</p>
                                            <div class="elst-select-mini">
                                                <el-form-item>
                                                    <el-select v-model="Form.isContractorDirectory">
                                                        <el-option label="请选择" value=""></el-option>
                                                        <el-option label="是" value="0"> </el-option>
                                                        <el-option label="否" value="1"> </el-option>
                                                    </el-select>
                                                </el-form-item>
                                            </div>
                                            <br>
                                        </el-row>
                                        <el-row v-else-if="i===Form.cbS_TotalCheckHeadApprove.length-1" class="cell">
                                            <p class="td-p">是否列入合格承包商名录：</p>
                                            <div class="elst-select-mini">
                                                <el-form-item>
                                                    <el-select v-model="Form.isContractorDirectory" disabled>
                                                        <el-option label="请选择" value=""></el-option>
                                                        <el-option label="是" value="0"> </el-option>
                                                        <el-option label="否" value="1"> </el-option>
                                                    </el-select>
                                                </el-form-item>
                                            </div>
                                            <br>
                                        </el-row>
                                        <!--<el-row class="cell">

        <div class="elst-select-mini">
            <el-form-item>
                <div style="position: absolute;margin-top:-15px;">
                    <el-input type="text" v-model="item.sysDuty.name" autocomplete="off" style="width:160px !important;" size="mini">
                    </el-input>
                </div>
            </el-form-item>
        </div>
    </el-row>-->
                                        <el-row class="cell">
                                            <p class="td-p" v-model="item.sysDuty.name"></p>
                                            <div class="elst-select-mini">
                                                <el-form-item>
                                                    <signature class="fl" v-model="item.summaryName" :disabled="false"></signature>
                                                </el-form-item>
                                            </div>
                                            <br>
                                            <el-row>
                                                <el-col :span="12">

                                                    <p class="td-p">结论：</p>
                                                    <div class="elst-select-mini">
                                                        <el-form-item>
                                                            <div style="position: absolute;z-index:999;left:0;right:0;margin-left:100px;">
                                                                <el-input v-if="Form.state === '3' && Form.mark02===item.mark01" type="text" v-model="item.summaryConclusion" autocomplete="off" style="width:100% !important;border: 1px solid #DCDFE6;" size="mini">
                                                                </el-input>
                                                                <el-input v-else type="text" v-model="item.summaryConclusion" autocomplete="off" style="width:100% !important;border: 1px solid #DCDFE6;" size="mini" disabled>
                                                                </el-input>
                                                            </div>
                                                        </el-form-item>
                                                    </div>
                                                </el-col>
                                                <el-col :span="12">
                                                    <div class="elst-select-mini fr">
                                                        <el-form-item v-if="Form.state === '3' && Form.mark02===item.mark01">
                                                            <el-date-picker v-model="item.summaryEvaluationDate" type="date" value-format="yyyy-MM-dd" 
                                                                            placeholder="选择日期">
                                                            </el-date-picker>
                                                        </el-form-item>
                                                        <el-form-item v-else>
                                                            <el-date-picker v-model="item.summaryEvaluationDate" type="date" value-format="yyyy-MM-dd" 
                                                                            placeholder="选择日期" disabled>
                                                            </el-date-picker>
                                                        </el-form-item>
                                                    </div>
                                                    <p class="td-p fr">{{OverallAssessment.Data+mark.m}}</p>
                                                </el-col>
                                            </el-row>
                                        </el-row>
                                    </td>
                                    </
                                </tr>
                                <!--<tr>
        <td colspan="1" rowspan="1" class="el-table_1_column_1 is-leaf" style="width: 85px">
            <div class="cell">{{OverallAssessment.results+mark.m}}</div>
        </td>
        <td colspan="1" rowspan="1" class="el-table_1_column_2 is-leaf">
            <el-row class="cell">
                <p class="td-p">是否列入合格承包商名录：</p>
                <div class="elst-select-mini">
                    <el-form-item>
                        <el-select v-model="Form.summaryEvaluator" disabled="true">

                            <el-option label="请选择" value=""></el-option>
                            <el-option label="是" value="0"> </el-option>
                            <el-option label="否" value="1"> </el-option>
                        </el-select>
                    </el-form-item>
                </div>
                <br>
                <el-row>
                    <el-col :span="12">
                        <p class="td-p">{{col.btnSign}}：</p>
                        <signature class="fl" v-model="value" :disabled="false"></signature>
                    </el-col>
                    <el-col :span="12">
                        <div class="elst-select-mini fr">
                            <el-form-item>
                                <el-date-picker v-model="Form.summaryEvaluationDate" type="date"
                                                placeholder="选择日期">
                                </el-date-picker>
                            </el-form-item>
                        </div>
                        <p class="td-p fr">{{OverallAssessment.Data+mark.m}}</p>
                    </el-col>
                </el-row>
            </el-row>
        </td>
    </tr>-->
                            </tbody>
                        </table>
                    </div>
                    
                </div>
            </el-row>
        </el-form>
        <br>
        <p class="remark">
            <strong>说明：</strong><br>
            1.此表作为财务结算的必须凭据；
            <br>
            2.此表作为下一次合同招(议)标的重要推荐依据。
        </p>
        <br>
        <div class="fr">
            <!--<el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnSave}}</el-button>
    <el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnCommit}}</el-button>-->
            <el-button type="primary" @click="onSubmitForm('ruleForm')">签字</el-button>
            <el-button type="primary" @click="parent.ListItem.dialogVisible=false">{{col.btnBack}}</el-button>
        </div>
    </div>

    <script type="text/javascript">

        var app = new Vue({
            el: '#app',
            data: {
                id: '',
                value: "",
             
                //业务表单内容
                tableData: [],
                //业务表单内容
                Form: {
                    id: guidEmpty,
                    Type: '',
                    Qualified: '',
                    YesOrNo: '',
                    Data: '',
                    isContractorDirectory: 0,
                    OverallAssessmentTypeName: '',//总体评估考核类别名称
                    assessTypeId: '',
                    contractorName: '', //"承包商名称"
                    contractNo: '',//合同号
                    projectName: '', //"项目名称"
                    mark01: '',//满分
                    mark02: '',//状态
                    CommentItem: '',
                    TheWeight: '',
                    fraction: '',//得分
                    EvaluationDescription: '',
                    cbS_TotalCheckDetail: [],
                    sysDataDic: { contractorName: '' },
                    cbS_List: { value: '' },
                    businessManagementEvaluator: '',//业务管理部门ID
                    businessManagementName: '',
                    cbS_TotalCheckHeadApprove: []//总体评估考核领导签字
                },
                Type: [],
                totalCheckTaskID: '',
                CBS_Lists: [],
                Qualified: [],
                YesOrNo: [],
                Data: [],
                ContractorName: [],
                ListItem: ListItem,
                OverallAssessmentTypeName: [],
                CategoryManage: [],
                //表单验证
                rules: {

                }
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                handleChange: function (value) {
                    console.log(value);
                },
                //提交数据
                onSubmitForm: function (formName) {
                    var mythis = this;
                    this.$refs[formName].validate(function (valid) {
                        //验证通过
                        if (valid) {
                            var isState = "0";
                            if (mythis.Form.state == "1") {
                                if (mythis.Form.territorialEvaluationConclusion == null || mythis.Form.territorialEvaluationConclusion == "" || mythis.Form.territorialEvaluationConclusion == undefined) {
                                    isState = "1";
                                    alert('请输入结论');
                                    return;
                                }
                                if (mythis.Form.territorialEvaluationDate == null || mythis.Form.territorialEvaluationDate == "" || mythis.Form.territorialEvaluationDate == undefined) {
                                    isState = "1";
                                    alert('请选择日期');
                                    return;
                                }
                            }
                            if (mythis.Form.state == "2") {
                                if (mythis.Form.businessManagementEvaluationConclusion == null || mythis.Form.businessManagementEvaluationConclusion == "" || mythis.Form.businessManagementEvaluationConclusion == undefined) {
                                    isState = "1";
                                    alert('请输入结论');
                                    return;
                                }
                                if (mythis.Form.businessManagementEvaluationData == null || mythis.Form.businessManagementEvaluationData == "" || mythis.Form.businessManagementEvaluationData == undefined) {
                                    isState = "1";
                                    alert('请选择日期');
                                    return;
                                }
                            }
                            if (mythis.Form.state == "3") {
                                
                                if (mythis.Form.cbS_TotalCheckHeadApprove[parseInt(mythis.Form.mark02)].summaryConclusion == null || mythis.Form.cbS_TotalCheckHeadApprove[parseInt(mythis.Form.mark02)].summaryConclusion == "" || mythis.Form.cbS_TotalCheckHeadApprove[parseInt(mythis.Form.mark02)].summaryConclusion == undefined) {
                                    isState = "1";
                                    alert('请输入结论');
                                    return;
                                }
                                if (mythis.Form.cbS_TotalCheckHeadApprove[parseInt(mythis.Form.mark02)].summaryEvaluationDate == null || mythis.Form.cbS_TotalCheckHeadApprove[parseInt(mythis.Form.mark02)].summaryEvaluationDate == "" || mythis.Form.cbS_TotalCheckHeadApprove[parseInt(mythis.Form.mark02)].summaryEvaluationDate == undefined) {
                                    isState = "1";
                                    alert('请选择日期');
                                    return;
                                }
                                if (parseInt(mythis.Form.mark02) == mythis.Form.cbS_TotalCheckHeadApprove.length - 1) {
                                    if (mythis.Form.isContractorDirectory == null || mythis.Form.isContractorDirectory == "" || mythis.Form.isContractorDirectory == undefined) {
                                        isState = "1";
                                        alert('请选择是否列入合格承包商名录');
                                        return;
                                    }
                                    
                                }
                            }
                            if (isState == "0") {
                                
                                onSubmitForm(this, '/api/CBS_TotalCheck/Approval', mythis.Form);
                            }
                        } else {
                            //验证失败
                            return false;
                        }
                    });
                },
                getData: function () {
                    var mythis = this;
                    if (mythis.id == null || mythis.id == "" || mythis.id == undefined || mythis.id == "undefined") {
                        mythis.Form.cbS_TotalCheckDetail = [];
                    } else {
                        getData(mythis, '/api/CBS_TotalCheck/get?id=' + mythis.id);
                        myAjax("post", mythis, '/api/CBS_TotalCheckDetail/GetList', { model: { cbSTotalCheckId: mythis.id }, offset: 0, limit: 100 }, function (response) {
                            mythis.Form.cbS_TotalCheckDetail = response.data.pageData;
                            //console.log('h1', response.data.pageData);
                        }, false);
                        myAjax("post", mythis, '/api/CBS_TotalCheckHeadApprove/GetList', { model: { totalCheckID: mythis.id }, offset: 0, limit: 100 }, function (response) {
                            mythis.Form.cbS_TotalCheckHeadApprove = response.data.pageData;
                            //console.log('h1', response.data.pageData);
                        }, false);
                        //承包商类别审批领导
                        //this.getCategoryApproveDuty();
                        //this.changeAssessType(mythis.Form.assessTypeId);
                        //承包商类别同主管部门
                        for (var i = 0; i < this.CategoryManage.length; i++) {
                            if (this.Form.businessManagementEvaluator == this.CategoryManage[i].manageDept) {
                                //this.Form.businessManagementEvaluator = this.CategoryManage[i].manageDept;
                                this.Form.businessManagementName = this.CategoryManage[i].sysDepartment.name;
                            }
                        }
                    }
                },
                onBack: function () {
                    parent.app.ListItem.dialogVisible = false;
                },
                indexMethod: function (index) {
                    return (this.ListItem.currentPage - 1) * this.ListItem.pagesize + index + 1;
                },
                //初始化承包商类型
                getTypeList: function () {
                    var mythis = this;
                    myAjax("post", this, '/api/CBS_DayCheckItem/CBSsglbGetList', { model: { category: 'cbssglb' }, offset: 0, limit: 100 }, function (response) {
                        mythis.Type = response.data;

                        //console.log(response.data.pageData);
                    }, false);
                },
                //初始化承包商下拉框
                getCBS_List: function () {
                    var mythis = this;
                    if (mythis.Form.assessTypeId == null || mythis.Form.assessTypeId == "" || mythis.Form.assessTypeId == undefined) {
                        myAjax("post", this, '/api/CBS_List/GetList', { model: { status: '', CreateFactory: null }, offset: 0, limit: 100 }, function (response) {
                            mythis.CBS_Lists = response.data.pageData;
                            //console.log('h1', response.data.pageData);
                        }, false);
                    } else {
                        var cc = "";
                        for (var i = 0; i < mythis.Type.length; i++) {
                            if (mythis.Type[i].id == mythis.Form.assessTypeId) {
                                cc = mythis.Type[i].key;
                            }
                        }
                        //供应商表施工类别与PD的不一致实际不是id是key
                        myAjax("post", this, '/api/CBS_List/GetList', { model: { constructionCategory: cc, CreateFactory: null }, offset: 0, limit: 100 }, function (response) {
                            mythis.CBS_Lists = response.data.pageData;
                            //console.log('h1', response.data.pageData);
                        }, false);
                    }
                },
                getCategoryManage: function () {
                    var mythis = this;
                    if (mythis.Form.assessTypeId == null || mythis.Form.assessTypeId == "" || mythis.Form.assessTypeId == undefined) {
                        myAjax("post", this, '/api/CBS_CategoryManage/GetList', { model: { status: '', CreateFactory: null }, offset: 0, limit: 100 }, function (response) {
                            mythis.CategoryManage = response.data.pageData;
                            //console.log('h1', response.data.pageData);
                        }, false);
                    } else {
                        myAjax("post", this, '/api/CBS_CategoryManage/GetList', { model: { constructionCategory: mythis.Form.assessTypeId, CreateFactory: null }, offset: 0, limit: 100 }, function (response) {
                            mythis.CategoryManage = response.data.pageData;
                            //console.log('h1', response.data.pageData);
                        }, false);
                    }
                },
                getCategoryApproveDuty: function () {
                    var mythis = this;
                    if (mythis.Form.assessTypeId == null || mythis.Form.assessTypeId == "" || mythis.Form.assessTypeId == undefined) {
                        mythis.Form.cbS_TotalCheckHeadApprove = [];
                    } else {
                        var templist = mythis.Form.cbS_TotalCheckHeadApprove;
                        if (templist == undefined || templist == null || templist.length == 0) { } else {
                            for (var z = 0; z < templist.length; z++) {
                                if (templist[z].id == undefined || templist[z].id == null || templist[z].id == "") { } else {
                                    mythis.delIds2.push(templist[z].id);
                                }
                            }
                        }
                        myAjax("post", this, '/api/CBS_CategoryApproveDuty/GetList', { model: { constructionCategory: mythis.Form.assessTypeId, CreateFactory: null }, offset: 0, limit: 100 }, function (response) {
                            //mythis.Form.cbS_TotalCheckHeadApprove = response.data.pageData;
                            var list = response.data.pageData;
                            mythis.Form.cbS_TotalCheckHeadApprove = [];
                            for (var i = 0; i < list.length; i++) {
                                mythis.Form.cbS_TotalCheckHeadApprove.push({ sysDuty: list[i].sysDuty, approveOrder: list[i].approveOrder, dutyId: list[i].dutyId, constructionCategory: list[i].constructionCategory });
                            }
                            //console.log('h1', response.data.pageData);
                        }, false);
                    }
                },
                changeAssessType: function (assessTypeId) {
                    var mythis = this;
                    if (assessTypeId == null || assessTypeId == "" || assessTypeId == undefined) { } else {
                        var templist = mythis.Form.cbS_TotalCheckDetail;

                        for (var z = 0; z < templist.length; z++) {
                            if (templist[z].id == undefined || templist[z].id == null || templist[z].id == "") { } else {
                                mythis.delIds.push(templist[z].id);
                            }
                        }

                        myAjax("post", mythis, '/api/CBS_TotalCheckItem/GetList', {
                            model: { assessTypeId: assessTypeId }, offset: 0, limit: 100
                        }, function (response) {
                            //console.log(response);
                            if (response.data.pageData.length == 0) {
                                mythis.tableData = [];
                            } else {
                                mythis.tableData = response.data.pageData;
                                mythis.Form.cbS_TotalCheckDetail = [];
                                for (var i = 0; i < mythis.tableData.length; i++) {
                                    mythis.Form.cbS_TotalCheckDetail.push({ cbS_TotalCheckItem: { checkProject: mythis.tableData[i].checkProject, weightPoints: mythis.tableData[i].weightPoints }, cbSTotalCheckItemId: mythis.tableData[i].id, fullScore: mythis.tableData[i].weightPoints, score: 0 });
                                }

                            }
                        });
                    }
                },
                postChange: function (val) {
                    //根据类型 筛选承包商
                    this.getCBS_List();
                    //承包商类别审批领导
                    this.getCategoryApproveDuty();
                    this.changeAssessType(val);
                    //承包商类别同主管部门
                    for (var i = 0; i < this.CategoryManage.length; i++) {
                        if (val == this.CategoryManage[i].constructionCategory) {
                            this.Form.businessManagementEvaluator = this.CategoryManage[i].manageDept;
                            this.Form.businessManagementName = this.CategoryManage[i].sysDepartment.name;
                        }
                    }

                }
            },
            mounted: function () {
                //this.Type = getDicData('29');
                //this.Qualified1 = getDicData('57');
                //this.Qualified2 = getDicData('57');
                //this.YesOrNo = getDicData('50');
                //this.ContractorName = getDicData('139');
                //this.OverallAssessmentTypeName = getDicData('56');
                //this.id = getUrlParam("id");
                //this.getData();
                

                this.id = getUrlParam("id");
                //this.totalCheckTaskID = getUrlParam("totalCheckTaskID");
                this.getTypeList();//评估类别
                this.getCBS_List();//承包商
                this.getCategoryManage();//承包商类别同主管部门
                this.getCategoryApproveDuty();//承包商类别审批领导
                this.getData();
            }
        });
    </script>
</body>

</html>